From: Florian Müllner Date: Wed, 6 Mar 2013 20:42:36 +0000 (+0100) Subject: appDisplay: Implement folder keynav and shortcuts X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4192 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b79b0952b4b1835eb5140d21f0808b9364c98997;p=gnome-shell.git appDisplay: Implement folder keynav and shortcuts When opening an application folder, it should take key focus to allow for keynav; also, Escape closing both folder and app picker is unexpected, it should only close the popup. https://bugzilla.gnome.org/show_bug.cgi?id=695314 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index bcfb57a2c..afeecc17f 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -627,10 +627,24 @@ const AppFolderPopup = new Lang.Class({ this._boxPointer.actor.bind_property('opacity', closeButton, 'opacity', GObject.BindingFlags.SYNC_CREATE); + global.focus_manager.add_group(this.actor); + source.actor.connect('destroy', Lang.bind(this, function() { this.actor.destroy(); })); + this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress)); + }, + + _onKeyPress: function(actor, event) { + if (!this._isOpen) + return false; + + if (event.get_key_symbol() != Clutter.KEY_Escape) + return false; + + this.popdown(); + return true; }, toggle: function() { @@ -645,6 +659,7 @@ const AppFolderPopup = new Lang.Class({ return; this.actor.show(); + this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); this._boxPointer.setArrowActor(this._source.actor); this._boxPointer.show(BoxPointer.PopupAnimation.FADE |